package com.liang.map;

import java.util.HashMap;
import java.util.Set;

public class ForHashMap1 {
    public static void main(String[] args) {
        HashMap<String, String> map = new HashMap<>();

        map.put("一号丈夫", "一号妻子");
        map.put("二号丈夫", "二号妻子");
        map.put("三号丈夫", "三号妻子");
        map.put("四号丈夫", "四号妻子");
        map.put("五号丈夫", "五号妻子");
        map.put("六号丈夫", "六号妻子");
        map.put("七号丈夫", "七号妻子");

        System.out.println(map);

        Set<String> keys = map.keySet();
        for (String key : keys) {
            String value = map.get(key);
            System.out.println(key+"---"+value);
        }
    }
}
